package com.bjsxt.livegoods.comment.client.controller;

import com.bjsxt.livegoods.comment.client.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class CommentController {
    @Autowired
    private CommentService commentService;

    @GetMapping
    @CrossOrigin
    public Map<String, Object> findComments(String id, int page){
        return commentService.findComments(id, page);
    }
}
